package com.aihna.mall.domain.bo;

import com.aihna.mall.domain.StoreUserLevel;
import com.aihna.common.core.validate.AddGroup;
import com.aihna.common.core.validate.EditGroup;
import com.aihna.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 用户等级配置业务对象 vvl_store_user_level
 *
 * @author Joseph.Chen
 * @date 2024-04-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = StoreUserLevel.class, reverseConvertGenerate = false)
public class StoreUserLevelBo extends BaseEntity {

    /**
     * 配置id
     */
    @NotNull(message = "配置id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 等级名称
     */
    @NotBlank(message = "等级名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 购买金额
     */
    @NotNull(message = "购买金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal money;

    /**
     * 有效时间
     */
    private Long validDate;

    /**
     * 是否为永久会员
     */
    private Integer isForever;

    /**
     * 是否购买,1=购买,0=不购买
     */
    private Integer isPay;

    /**
     * 是否显示 1=显示,0=隐藏
     */
    private Integer isShow;

    /**
     * 会员等级
     */
    @NotNull(message = "会员等级不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long grade;

    /**
     * 享受折扣
     */
    @NotNull(message = "享受折扣不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal discount;

    /**
     * 会员卡背景
     */
    @NotBlank(message = "会员卡背景不能为空", groups = { AddGroup.class, EditGroup.class })
    private String image;

    /**
     * 会员图标
     */
    @NotBlank(message = "会员图标不能为空", groups = { AddGroup.class, EditGroup.class })
    private String icon;

    /**
     * 说明
     */
    private String description;


}
